home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Merciful 2
/
Merciful - Disc 2.iso
/
software
/
k
/
kids7.dms
/
kids7.adf
/
beach.amos
/
beach.amosSourceCode
< prev
next >
Wrap
AMOS Source Code
|
1992-10-04
|
7KB
|
207 lines
Dim ALPH$(10),WORD$(20),DUN(20)
Global ALPH$(),WORD$(),DUN()
Global LEVEL,HT$,HT,TIDE,CHK,LX,WORDLEN,COUNT,MZ,MK,ANSWER$
Global AMR$,AMW$,AMO$,PSW,WIX,SCORE,NAME$,XX$
STUP
'
Procedure STUP
Colour Back $F : STRIPPER : Unpack 10 To 0 : Screen Display 0,,32,, : Double Buffer : Make Icon Mask
For N=1 To 15 : Channel N To Bob N : Next N : SPLASH
AMR$="A 0,(3,10)(4,10)(5,10)"
AMW$="L R1=XS(0,XM); L R2=R1-50; M R2,0,30" : AMO$="M R2,0,30;"
Get Fonts : Set Font 3 : HT$="HIGH TIDE: " : HT=99 : TIDE=False
Screen Open 1,320,47,32,Lowres : Screen To Back : Get Palette 0 : Cls 0 : Set Font 3 : Screen 0
REEDWORDS : For N=1 To 20 : DUN(N)=0 : Next N : Limit Mouse 147,130 To 415,131
SHOVE : X Mouse=163 : CHK=163 : PSW=5 : WIX=250
Repeat
If HT<>999
BUCKET
GRABBUK
End If
Until HT=999
Screen Close 1
DAVE
A$=NAME$+"|"+Str$(LEVEL)+"/"+XX$+"\"+Str$(SCORE) : Command Line$=A$
Run "KIDS-7:cards.amos"
End Proc
Procedure MAKECASTLE
Hide : WALKY : Amal Freeze 1 : Amal Freeze MZ : Reset Zone MZ : Restore L
For N=1 To WORDLEN-2 : Read LABEL$ : Next N : Restore LABEL$
For N=1 To COUNT : Read IX,IY,IM : Next N
XB=X Bob(MZ) : YB=Y Bob(MZ)
XX=IX-XB : YY=IY-YB : A$=AMR$+"M R5,R6,30" : Amal 1,A$ : B$="M R5,R6,30" : Amal MZ,B$
Amreg(1,5)=XX-10 : Amreg(1,6)=YY-10 : Amal On 1 : Amreg(MZ,5)=XX : Amreg(MZ,6)=YY : Amal On MZ
While Chanmv(1) or Chanmv(MZ) : Wend : Amal Off MZ
Amal Freeze 1 : Amal 1,"L R1=Y; L R2=Y-60; F R0=1 T R2; L Y=R1-R0; N R0" : Amal On 1
Bob MZ,,,2 : Wait 10 : Paste Bob IX,IY,IM : Bob MZ,IX,IY,IM : Inc COUNT
While Chanmv(1) : Wend : Amal Freeze 1 : WALKO : SHOVE : Show
THREE: Data 100,150,6,132,150,7,160,150,8
FOUR: Data 105,165,7,132,138,10,160,138,10,188,165,7
FIVE: Data 90,150,6,123,150,7,151,123,10,179,150,7,209,150,8
SIX: Data 80,150,6,113,150,7,141,123,10,170,123,10,198,150,7,227,150,8
SEVEN: Data 70,150,6,104,150,7,132,150,7,160,123,10,188,150,7,217,150,7,245,150,8
L: Data "THREE","FOUR","FIVE","SIX","SEVEN"
End Proc
Procedure SPLASH
Screen 0 : Bob 15,-32,230,9
Amal 15,"L: M 0,-10,50; M 0,10,100; P; J L" : Amal On 15
End Proc
Procedure BUCKET
IX=0 : For N=1 To 10 : ALPH$(N)="" : Next N
Repeat
ANSWER=Rnd(19)+1 : GOOD=False
If DUN(ANSWER)=0 : DUN(ANSWER)=1 : GOOD=True : End If
Until GOOD
ANSWER$=WORD$(ANSWER) : WORDLEN=Len(ANSWER$) : TEXLEN=Text Length(ANSWER$) : TEXLEN=(320-TEXLEN)/2
Screen 0 : Cls 31,90,15 To 235,35 : I=31
For N=1 To WORDLEN*2
If I=31 Then I=2 Else I=31
If I=2 Then Sam Play 9,2,12000
Ink I : Text TEXLEN,32,ANSWER$
If I=2 Then Wait 25 Else Wait 10
Next N
For N=1 To WORDLEN
Repeat : X=Rnd(9)+1 : Until ALPH$(X)=""
T$=Mid$(ANSWER$,N,1) : ALPH$(X)=T$
Next N
For N=1 To 10
If ALPH$(N)=""
Repeat
ALPH=Rnd(25)+1 : GOOD=True
For M=1 To WORDLEN
ACHK=Asc(Mid$(ANSWER$,M,1))-96
If ALPH=ACHK
GOOD=False
End If
Next M
Until GOOD
ALPH$(N)=Chr$(ALPH+96)
End If
Next N
Screen 1
For N=1 To 10
TL=Text Length(ALPH$(N)) : TL=(28-TL)/2
Paste Bob IX,0,1 : Gr Writing 1 : Ink 12,13
Text IX+TL,28,ALPH$(N) : Gr Writing 8 : Ink 15
Text(IX+TL)-1,27,ALPH$(N)
Get Bob 1,N+10,IX,0 To IX+28,41 : Wait Vbl : Add IX,28
Next N
A1$="L: M 0,-5,50; M 0,5,50; P; J L" : A2$="L: M 0,10,50; M 0,-10,50; P; J L"
A$=A1$ : BX=30 : Screen 0
For N=11 To 20
Sam Play 9,2,8000
Bob N-9,BX,74,N : Wait Vbl : Add BX,28 : Amal N-9,A$ : Amal On N-9
If A$=A1$ Then A$=A2$ Else A$=A1$
Next N
End Proc
Procedure REEDWORDS
If LEVEL=1 Then T$="words1.dat"
If LEVEL=2 Then T$="words2.dat"
If LEVEL=3 Then T$="words3.dat"
Open In 1,"KIDS-7:bits/"+T$
For N=1 To 20 : Input #1,WORD$(N) : Next N
Close 1
End Proc
Procedure RIZER
If PSW=12000 Then PSW=8000 Else PSW=12000
Sam Play 6,1,PSW
If HT=9 Then HT$=HT$+" "
Text 90,71,HT$+Str$(HT)+" "
Dec HT
If HT=0
TIDE=True : Text 110,32,"Score:"+Str$(SCORE)
For N=1 To 5
Sam Play 6,1,8000
Text 90,71," HIGH TIDE ! " : Wait 4
Sam Play 6,1,12000
Text 90,71," " : Wait 2
Next N
Else
Every On
End If
End Proc
Procedure GRABBUK
Ink 2 : Every 120 Proc RIZER : Every On : ZUPPY
COUNT=1
While COUNT<WORDLEN+1
Repeat
If TIDE
Every Off : HT=999 : CLUB
Sam Play 15,3,6000
For N=230 To 110 Step -10
Bob 15,,N,9 : Wait Vbl : Cls 11,0,N+20 To 350,N+50 : Wait Vbl
Next N
Pop Proc
End If
MOUSEY_MOUSEY
MZ=Mouse Zone : MK=Mouse Key
Until(MK>0 and MZ>0) or HT=999
GUESS$=ALPH$(MZ-1)
Sam Play 9,4,2000
If GUESS$=Mid$(ANSWER$,COUNT,1)
MAKECASTLE
Add SCORE,10
If COUNT=WORDLEN+1
Paste Icon WIX,50,1 : Add WIX,10 : Add SCORE,25
End If
Else
COUNT=WORDLEN+1 : Add SCORE,-15
End If
Wend
FLOOD
End Proc
Procedure STRIPPER
A$=Command Line$ : A=Instr(A$,"|") : B=Instr(A$,"/") : C=Instr(A$,"\") : L=Len(A$)
NAME$=Left$(A$,A-1) : L$=Mid$(A$,A+1,B-A-1) : LEVEL=Val(L$)
XX$=Mid$(A$,B+1,C-B-1) : S$=Right$(A$,L-C) : SCORE=Val(S$) : Mid$(XX$,2,1)="."
End Proc
Procedure ZUPPY
Reserve Zone 11
TX=29 : BX=55
For N=2 To 11
Set Zone N,TX,69 To BX,120
Add TX,28 : Add BX,28
Next N
End Proc
Procedure FLOOD
CLUB
Sam Play 15,3,6000
For N=230 To 110 Step -10
Bob 15,,N,9 : Wait Vbl : Cls 11,0,N+20 To 350,N+50 : Wait Vbl
Next N
Sam Play 15,3,8000
For N=110 To 230 Step 10
Bob 15,,N,9 : Wait 3 : Cls 17,0,N+10 To 350,N+30 : Wait 2
Next N
End Proc
Procedure CLUB
For N=2 To 11
Sam Play 9,2,9000
Bob Off N : Wait Vbl
Next N
End Proc
Procedure MOUSEY_MOUSEY
LX=CHK
If X Mouse<LX-5 Then CHK=CHK-28
If X Mouse>LX+5 Then CHK=CHK+28
X Mouse=CHK
If LX<>CHK Then Sam Play 9,4,X Mouse*30
End Proc
Procedure SHOVE
Amal Freeze 1 : Bob 1,20,50,3
Amal 1,AMR$ : Amal On 1
End Proc
Procedure WALKY
Amal Freeze 1 : Amal 1,AMR$+AMW$ : Amal On 1
While Chanmv(1) : Wend
End Proc
Procedure WALKO
Amal Freeze 1 : Amal 1,AMR$+AMO$
Amreg(1,2)=50-X Bob(1) : Amal On 1
While Chanmv(1) : Wend
End Proc
Procedure DAVE
Sam Play 15,3,8000
Fade 3,$F,$F,$F,$F,$F,$F,$F,$F,$F,$F,$F,$F,$F,$F,$F,$F,$F,$F,$F,$F,$F,$F,$F,$F,$F,$F,$F,$F,$F,$F,$F,$F,
Wait 22 : Sam Play 14,3,9000 : Wait 22 : Reserve Zone : Amal Off : Bob Off : Screen Close 0
End Proc